package com.example.demo.controller;

import com.example.demo.dao.HelloDao;
import com.example.demo.service.UserService;
import com.example.demo.vo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

@RestController
public class Userer {

    @Autowired
    public HelloDao helloDao;

    @Autowired
    public UserService userService;

    @RequestMapping("/hello")
    public List<User> hello(){
        List<User> list = helloDao.selectById();
       return list;
    }

    @PostMapping("/setList")
    public User setList(@RequestBody User params){
        User user = userService.setInfoList(params);
        return user;
    }
}
